<template>
  <div class="vi">
    <div class="an">
      <el-button class="btn" @click="handelCilck">返回</el-button>
    </div>
    <div id="video-container"></div>
  </div>
</template>

<script lang="ts">
import { Component, Vue } from "vue-property-decorator";
import videoClass from "@/utils/videoClass.js";
@Component
export default class extends Vue {
  aa = null;
  handelCilck() {
    // 测试
    // this.aa._cameraIndexCodeList.push("1213");
    // this.aa.preview();
    this.$router.go(-1)
  }
  mounted() {
    var options = {
      appkey: "20496996",
      secret: "3aP7Qiv5E5J39LtA1As7",
      ip: "10.192.102.55",
      port: 20443,
    };
    this.aa = new videoClass(options);
    console.log(this.aa);
  }
  //关闭视频窗口
  beforeDestroy() {
    if (this.aa) {
      this.aa.stop();
    }
  }
}
</script>

<style lang="scss" scoped>
.vi {
  width: 100%;
  height: 100%;
  .btn {
    margin-top: 100px;
  }
  .an {
    height: 20%;
  }
  #video-container {
    width: 100%;
    height: 80%;
  }
}
</style>

